package cn.tedu.boot32.mapper;


import cn.tedu.boot32.entity.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface UserMapper {
    //返回值时String 直接把查询到的密码返回
    //返回值写成User 会把查询到的密码装到User对象中 返回
    @Select("select password from user where username=#{username}")
    User check(String username);
    @Insert("insert into user values(null,#{username},#{password},#{nick})")
    void insert(User user);
}
